3dmeshmodsfandomcom-20200213-history
3D Mesh Replace Tutorial (Hair)
This is the Mesh Replace tutorial for Hair only, for the Object mesh tutorial, please visit here: 3D Mesh Replace Tutorial (Objects) __TOC__ 'Introduction' Mesh Replacement in the simplest form is the following: #Import a game mesh using the TKM17 to Blender tool. #Import a mesh of your choosing #Join the your mesh with the game mesh. #Export the new combined mesh By following this tutorial, you should be able to have a good grasp on importing, editing and exporting meshes for the game. This tutorial assumes the following: -You have never used Blender before -You have at the very least already set up the TKM17 to Blender tool (Download and read carefully “Doc_v0.8.3.7z” it tells you exactly how to set everything up step-by-step) -You are using Blender v2.64 'Getting Started' Basic Blender Commands *Mouse wheel zooms in and out *Hold the Middle Mouse Button (mouse wheel or MMB) and move your mouse to rotate the camera *You select meshes with the Right Mouse Button (RMB) or you can select them under the “Scene Interface” everything else you use the Left Mouse Button (LMB) like normal. *When you have a mesh selected, TAB alternates between “Object Mode” and “Edit Mode” *CTRL + Z is undo For more information please visit: http://wiki.blender.org/index.php/Doc:2.6/Manual/3D_interaction/Navigating/3D_View I highly recommend starting up Blender, and using each of the four commands listed till your comfortable before moving on For this tutorial, we will be using a sample Short Hair for the hair > hat replacement. It can be downloaded below: Short Hair http://www.putlocker.com/file/46BE8F6DFA9A0D11 After you download it, extract the contents and remember where you extracted the folder. Also make sure you have downloaded Body01_HairHatPosition as well (link given in the post leading here) Advanced Blender Commands 1 - View *5 - Perspective /Iso view *7 - Top view *1 - Front view *3 - Right view *2,4,6,8 - rotate view *Home - Zoom extend *, - Zoom to selection 2 - Navigation *G - Move *S - Scale *R - Rotate *H - hide ; Alt +H unhide *X - erase *A - Select/Unselect all 2 - Hide/Show Toolbar *N - Propertiers (Move, Rotate, Scale, Display) *T - Tools 3 - Window Type *Shift + **F10 Uv Editor **F5 3d View 'Importing' Hair > Hat Replacement Tutorial First, start up Blender, right click the Cube and delete it because we don't need it. Next, go to file>Save As... and save it as ShortHair and save it as a blend file. You have to do this so you are able to import the game files (as shown below) Now, your import tab should no longer be grayed out. 1 Under type/select a filename, type in hat02 (cowboy hat), in the list that shows up choose cloth_hat02 and click the green checkmark button. Blender should now import the hat mesh into the screen. 2 Note how I imported while in Object Mode, ''imports and exports must be done in Object Mode'' 3 Before going on the next step I want you to check out the little eye icon to the right of the screen, left click it and it should hide / unhide the mesh. This is a useful function for the future. Good now we have the hat that we want to replace, next, we're going to import the body which will be used for reference later on. Go to File>Import>Wavefront (.obj) then simply navigate to your Body01_HairHatPosition folder and double click the Body01_HairHatPosition.obj to import it. A couple of points before we move on. Note in this case the hat fits the body perfectly, this is not always the case, some hats have weird positions in blender. Also the position of the hat in blender is the position of the hat (with all the position sliders at default) in-game. Last but not least, Go to File>Import>Wavefront (.obj) and navigate to your Short Hair sample folder that you downloaded and extracted earlier, there should be a "short hair.obj" file in there, double click to import it in Blender. At this point, if you get the above screen then congratulations! You are 1/4 of the way there. Summary of Importing #Save your blender file first #Make sure you are in Object Mode #Import the game object you want to replace #Import the body for reference #Import the hair mesh 'Editing' Hair > Hat Replacement After you have imported your meshes, you want to select your mesh and check for the following: 1. What type of "face" your mesh has in Edit Mode (Easily Fixable) 2. The integrity of the object's UV Map in UV Editing Mode (Could cause potential problems) ---- '1. What type of "face" your mesh has in Edit Mode' With the Short Hair Mesh selected, press TAB to go into "Edit Mode". Then choose "Solid" under viewport shading (shown in picture below) You should see that there are a lot of "triangles" that cover your mesh. Without going into details, the game will only accept meshes with "triangle" faces. Since the hair mesh's faces are triangular by default it is good to go. (In the future, if your hair's mesh face is not triangular, you can convert it by: selecting the mesh in Edit Mode and press CTRL + T, this will "triangulate" all of the mesh's faces.) '2. The integrity of the object's UV Map in UV Editing Mode' Select the short hair mesh. Press TAB to go into edit mode, and press A (A is shortcut for select all) to make sure you have the entire hair mesh selected (press A again to deselect the mesh...etc) Now go towards the top of your screen, click the drop down button and click UV Editing. You should get the following screen below (step 3) While we are in this screen, if you move your cursor the the right side of the screen and press A repeatedly you will notice the uv map disappear and re-appear. The uv map will only show up on the left side when you have the mesh selected. When you move your cursor on the left side and press A, you should notice you are selecting and unselecting the entire uv map. Now go towards the bottom left of the screen (the UV Editing side) and click image>open image. Navigate to your short hair sample folder and double click the Short Hair sample.png. Afterwards, go to the view port shading and change from Solid to Texture so you can actually see the texture. In your UV Editing screen, go towards the bottom and left click the magnet icon, this will "snap" the uv map when you move it. Press A while your cursor is in UV Editing Mode to select-all the uv map. Press G (shortcut key for moving the uv map in the x or y direction), and slowly move your mouse down to move the uv map like the picture below: Good, now the UV Map fits within the image. At this point your done with UV Edit. (Make sure to UNCLICK the magnet icon) However, before we move on I want you to go back to images>save as image and choose .png and click the RGBA button this is because we will be needing a .png texture file later and for hairs, we want the alpha channels. Just save it to a place that you remember. (NOTE: You technically do not have to do this, as the hair texture file is already in .png format, however not all images will be in .png format, this is just to show you how to convert any image into .png format in the future) Now go towards the top of the screen, select the drop down box and choose default. Now that your back in default view, we want the hair to actually be on top of the head, and not in the sky. You can move the hair using either the manipulator (#1) for a general movement or the transform location (#2) for precision positioning. Move the hair down however you want, note that the hat is in the way and it is hard to tell how the hair fits. Remember what I said before about the eye icon that hides and un-hides the mesh? Click the hat's eye icon to hide it. With the hat out of the way, you can now edit and hair and make it fit to the head. Press TAB go into Edit Mode, and use a combination of Scaling and positioning to make the hair fit. As far as I know, there is no magic formula (or autofit) for scaling and the positioning of different type of hair. You have to tinker around till it looks correct, and test it in-game. Possibly coming back and make minor adjusts and repeat till your satisfied. Anyways here are the position and dimensions for the hair that should fit the head relatively well: Now that we have the hair properly scaled and positioned, it is time to join it with the hat. Read carefully the following steps: First, click the hair mesh, press TAB to go into Edit Mode, and press A to unselect the mesh. Next, press TAB and go back to object mode. Un-hide the hat02_mesh. Under the scene window at the right side of the screen first Shift + Left Click the Model001_6_Material58_0.5_0.0_0.001, then Shift + Left Click the hat02_mesh. Go to objects, join or just press CTRL + J. After you joined the two meshes, press TAB to go into edit mode, and you should have only the hat mesh selected, press "X" on your keyboard to delete the hat verticies. Press TAB to go back to object mode and you should have something similiar to the screen below. NOTE: '''(Check picture below) After joining the two objects, click the hat02_mesh below (#1), and then click the Textures icon (#2) scroll down and make sure the Map: says UV0 and the highlighted area is not red. If it says something other than UV0 or it is red. You messed up the UV Map somewhere and you need to re-do the editing section. (Or else your texture will be messed up after you export it in-game). '''At this point, if you get the above screen then congratulations! You are 2/4 of the way there. Summary of Editing #Check the Mesh has triangulated faces #Make sure the mesh is linked to a texture via UV Editing (the UV fits inside the texture and the object looks ok) #Edit the Position and Size of the hair so it fits on the head. #Left Click the hair mesh first, then Shift + Left Click the hat mesh and click join (CTRL + J) #Check the UV Map and make sure it says UV0 and looks like the picture above 'Exporting' Hair > Hat Replacement With the hat02_mesh selected, and while in Object Mode, go towards the left side of your screen, under the Importer Tool, select export and make sure you have the following things checked. Hit Generate. You should have gotten a *****.Outfit0038.p001.txx as well as a Folder called the same (without the .txx of course). Congratulations, that wasn't so hard was it? :P You are 3/4 of the way there! 'Post-Exporting' Hair > Hat Replacement First, copy and paste the ******.Outfit0038.p001.txx file to your archives folder. You now have the edited hat mesh (short hair) inside of the cowboy hat. Next, take the "short hair texture.png" file you had saved awhile back and move it to your ActiveMod folder. (Create a new folder called "AA Hair Mod" or you can name it anything you want this doesn't matter) Re-Name the short hair texture.png to: "M_Cowboy001_Hat.png" Now we want a corresponding .txf file. There are two ways to do this: #Navigate to another one of your other activemod folders and just copy and paste any .txf file to your AA Hair Mod folder and re-name the .txf file to M_Cowboy001_Hat.txf #Go to ******\Archives\2.114.001_original\Folders\*****.Outfit0038.Tex032M\Images\Q=Tex032M\Shared\Cloth and copy and paste the cloth_hat02.txf into your AA Hair Mod folder. After you have a M_Cowboy001_Hat.txf in your ActiveMod/AA Hair Mod folder, right click the .txf file and open it with NotePad and change whatever is in there to the followig: "RGBA_8888" "AlphaBlend/AlphaMask/WriteZ" (Including the quotation marks) ---- You should now have the following files in the following places: In Archives ______.Outfit0038.p001.txx In ActiveMod/AA Hair Mod M_Cowboy001_Hat.png M_Cowboy001_Hat.txf Launch the game and in-game, go to hats, and choose the hat called "AA Hair Mod" and you should get the following screen: If you got the picture shown above, than congratulations you have just learned the basics of importing, editing, and exporting hair meshes into the game! 'F.A.Q.s' How do I get rid of the mod? Simply delete the ____.p001.txx file Solutions to uv map errors 1) load the tool/hair 2) Import an obj file at this point both, the tool and the imported file have an UV map named UVO 3) delete the UV map of the imported obj file. (can be done in "object data"), this way conflicts between the two UV-maps were avoided. 4) resize the obj file to the size you want 5) now join obj mesh to the tool (maybe here is a small error in your tutorial: selecting the objects worked with RMB in the 3D-View and with LMB in the Outliner) 6) edit the uv map ... Alternative solution for uv map issues After you renamed the uv map to UV0 and placed the uv on the texture: 1) start the UV Editing mode and select the all uv map (default keyboard key A) 2) at the bottom left there should be an option called UVs next to View Select Image options, click on it 3) a menu will appear with multiple options, at the top of the menu there should be an option called Export UV Layout, click it 4) a new screen will appear, at the top right of the screen press Export UV Layout button (it doen't matter in what folder you chose or what name you give to the file) -you won't need that file, but this proccess will force some sort of uv map registration for the mesh 5) now you can export your mesh as a .txx file, .bs or .bsb '- keep in mind that the texture file must have appropriate width and height, 'such as : 1024x1024 , 512x512 , 256x256 , 1024x512 , 1024x256 or 256x2048 etc. -if the texture file is for example 500x600, then it won't work in game. 'Tips and Hints.'